Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove text and field queries #4033

Closed
kimchy opened this issue Oct 31, 2013 · 4 comments
Closed

Remove text and field queries #4033

kimchy opened this issue Oct 31, 2013 · 4 comments

Comments

@kimchy
Copy link
Member

kimchy commented Oct 31, 2013

text query has been replaced by match query and been deprecate for some time.

field query is very confusing, its effectively the Lucene query string syntax on a specific field, but its not evident from the name (can be confuse with match). It would be much better to remove it, and ask people to use query_string with a properly set default field. This is much more explicit regarding what it does.

@clintongormley
Copy link

++

@clintongormley
Copy link

Also remove mlt_field in favour of just mlt, for the same reasons as field

@ghost ghost assigned dakrone Dec 6, 2013
dakrone added a commit to dakrone/elasticsearch that referenced this issue Dec 6, 2013
The `text` query was replaced by the `match` query and has been
deprecated for quite a while.

The `field` query should be replaced by a `query_string` query with
the `default_field` specified.

Fixes elastic#4033
brusic pushed a commit to brusic/elasticsearch that referenced this issue Jan 19, 2014
The `text` query was replaced by the `match` query and has been
deprecated for quite a while.

The `field` query should be replaced by a `query_string` query with
the `default_field` specified.

Fixes elastic#4033
@jeacott
Copy link

jeacott commented Mar 14, 2014

I lament this decision, queryString is a very loose interface when trying to construct queries dynamically in Java. it seems we're now reduced to string concat ("field:value") instead of the much more robust fieldQuery(field, value).
what am I missing?

@kimchy
Copy link
Member Author

kimchy commented Mar 14, 2014

you can use match query on specific fields. If you still want to have the query string syntax that the field query supported, you can use query_string query, and set the default field on it (this is exactly what the field query was doing behind the scenes).

scorphus added a commit to scorphus/tornado-es that referenced this issue Apr 30, 2014
aflag added a commit to aflag/estester that referenced this issue Aug 4, 2014
text query has been deprecated in elasticsearch 0.90 and removed in
elasticsearch 1.0. match query should be used instead.

elastic/elasticsearch#4033
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants